package com.xoa.controller.party;


import com.xoa.model.party.SubjectActivity;
import com.xoa.service.party.SubjectActivityService;
import com.xoa.util.common.wrapper.BaseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 程叶同 on 2018/1/16.
 */
@Controller
@RequestMapping("subjectActivity")
public class SubjectActivityController {
    @Autowired
    SubjectActivityService subjectActivityService;

   @RequestMapping("/addSubjectActivity")
   @ResponseBody
   public BaseWrapper addSubjectActivity(SubjectActivity subjectActivity){
       return  subjectActivityService.addSubjectActivity(subjectActivity);
   }

    @RequestMapping("/deleteSubjectActivity")
    @ResponseBody
    public BaseWrapper deleteSubjectActivity(Integer id){
        return  subjectActivityService.deleteSubjectActivity(id);
    }

    @RequestMapping("/updateSubjectActivity")
    @ResponseBody
    public BaseWrapper updateSubjectActivity(SubjectActivity subjectActivity){
        return  subjectActivityService.updateSubjectActivity(subjectActivity);
    }

    @RequestMapping("/getSubjectActivityById")
    @ResponseBody
    public BaseWrapper getSubjectActivityById(HttpServletRequest request, Integer id){
        return  subjectActivityService.getSubjectActivityById(request,id);
    }

    @RequestMapping("/getList")
    @ResponseBody
    public BaseWrapper getList(HttpServletRequest request, Integer page, Integer pageSize, String community, boolean useFlag, String startTime, String endTime, String subject, String organizeId){
        return  subjectActivityService.getList(request,page,pageSize,community,useFlag,startTime,endTime,subject,organizeId);
    }

}
